package org.cuadroanotacionapi.persistencia;

import org.cuadroanotacionapi.beans.Jos_fastball_playerstat;
import org.cuadroanotacionapi.beans.*;
import org.cuadroanotacionapi.controller.*;
import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.*;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.PreparedStatement;
import java.util.Map;
import java.util.Iterator;
import java.util.HashMap;
import java.util.Map;
 import javax.sql.DataSource;
import org.cuadroanotacionapi.generales.Mensajeria;
import org.cuadroanotacionapi.generales.Sesion;


/**
*
* @author
*/

public class Jos_fastball_playerstatPersistencia implements Serializable {
private static final long serialVersionUID = 1L;
public static Exception excepcion;
public static boolean esMensaje = false;
public static Connection con = null;

public Jos_fastball_playerstatPersistencia(){
         esMensaje =false;
}


/**
*
* Insertar()
*/

public static boolean Insertar (Jos_fastball_playerstat jos_fastball_playerstat ) {
  excepcion = null;
  try {
      esMensaje =false;
   
   
   
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pinsert = null;
      String sql = "insert into jos_fastball_playerstat(id,gameid,playerid,homeflag,hitting_pa,hitting_h,hitting_rbi,hitting_1b,hitting_2b,hitting_3b,hitting_hr,hitting_bb,hitting_k,hitting_sac,hitting_hbp,hitting_roe,hitting_fc,hitting_dp,running_r,running_sb,running_cs,running_lob,pitching_inn,pitching_inn_p,pitching_count,pitching_bf,pitching_ab,pitching_r,pitching_er,pitching_bb,pitching_k,pitching_h,pitching_hr,pitching_wp,pitching_hb,pitching_w,pitching_l,pitching_s,pitching_cg,pitching_sho,fielding_asst,fielding_po,fielding_e,catching_ic,catching_pb,catching_sb,catching_cs,catching_co,entered,battingorder)  values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
      pinsert = con.prepareStatement(sql);
              pinsert.setInt(1,jos_fastball_playerstat.getId());
        pinsert.setInt(2,jos_fastball_playerstat.getGameid());
        pinsert.setInt(3,jos_fastball_playerstat.getPlayerid());
        pinsert.setBoolean(4,jos_fastball_playerstat.getHomeflag());
        pinsert.setInt(5,jos_fastball_playerstat.getHitting_pa());
        pinsert.setInt(6,jos_fastball_playerstat.getHitting_h());
        pinsert.setInt(7,jos_fastball_playerstat.getHitting_rbi());
        pinsert.setInt(8,jos_fastball_playerstat.getHitting_1b());
        pinsert.setInt(9,jos_fastball_playerstat.getHitting_2b());
        pinsert.setInt(10,jos_fastball_playerstat.getHitting_3b());
        pinsert.setInt(11,jos_fastball_playerstat.getHitting_hr());
        pinsert.setInt(12,jos_fastball_playerstat.getHitting_bb());
        pinsert.setInt(13,jos_fastball_playerstat.getHitting_k());
        pinsert.setInt(14,jos_fastball_playerstat.getHitting_sac());
        pinsert.setInt(15,jos_fastball_playerstat.getHitting_hbp());
        pinsert.setInt(16,jos_fastball_playerstat.getHitting_roe());
        pinsert.setInt(17,jos_fastball_playerstat.getHitting_fc());
        pinsert.setInt(18,jos_fastball_playerstat.getHitting_dp());
        pinsert.setInt(19,jos_fastball_playerstat.getRunning_r());
        pinsert.setInt(20,jos_fastball_playerstat.getRunning_sb());
        pinsert.setInt(21,jos_fastball_playerstat.getRunning_cs());
        pinsert.setInt(22,jos_fastball_playerstat.getRunning_lob());
        pinsert.setInt(23,jos_fastball_playerstat.getPitching_inn());
        pinsert.setInt(24,jos_fastball_playerstat.getPitching_inn_p());
        pinsert.setInt(25,jos_fastball_playerstat.getPitching_count());
        pinsert.setInt(26,jos_fastball_playerstat.getPitching_bf());
        pinsert.setInt(27,jos_fastball_playerstat.getPitching_ab());
        pinsert.setInt(28,jos_fastball_playerstat.getPitching_r());
        pinsert.setInt(29,jos_fastball_playerstat.getPitching_er());
        pinsert.setInt(30,jos_fastball_playerstat.getPitching_bb());
        pinsert.setInt(31,jos_fastball_playerstat.getPitching_k());
        pinsert.setInt(32,jos_fastball_playerstat.getPitching_h());
        pinsert.setInt(33,jos_fastball_playerstat.getPitching_hr());
        pinsert.setInt(34,jos_fastball_playerstat.getPitching_wp());
        pinsert.setInt(35,jos_fastball_playerstat.getPitching_hb());
        pinsert.setInt(36,jos_fastball_playerstat.getPitching_w());
        pinsert.setInt(37,jos_fastball_playerstat.getPitching_l());
        pinsert.setInt(38,jos_fastball_playerstat.getPitching_s());
        pinsert.setInt(39,jos_fastball_playerstat.getPitching_cg());
        pinsert.setInt(40,jos_fastball_playerstat.getPitching_sho());
        pinsert.setInt(41,jos_fastball_playerstat.getFielding_asst());
        pinsert.setInt(42,jos_fastball_playerstat.getFielding_po());
        pinsert.setInt(43,jos_fastball_playerstat.getFielding_e());
        pinsert.setInt(44,jos_fastball_playerstat.getCatching_ic());
        pinsert.setInt(45,jos_fastball_playerstat.getCatching_pb());
        pinsert.setInt(46,jos_fastball_playerstat.getCatching_sb());
        pinsert.setInt(47,jos_fastball_playerstat.getCatching_cs());
        pinsert.setInt(48,jos_fastball_playerstat.getCatching_co());
        pinsert.setBoolean(49,jos_fastball_playerstat.getEntered());
        pinsert.setInt(50,jos_fastball_playerstat.getBattingorder());
      int filas= pinsert.executeUpdate();
      pinsert.close();
      con.close();
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
 }


/**
*
* Editar()
*/

public static boolean Editar(Jos_fastball_playerstat jos_fastball_playerstat ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pupdate = null;
      String sql = "update jos_fastball_playerstat set  id=?, gameid=?, playerid=?, homeflag=?, hitting_pa=?, hitting_h=?, hitting_rbi=?, hitting_1b=?, hitting_2b=?, hitting_3b=?, hitting_hr=?, hitting_bb=?, hitting_k=?, hitting_sac=?, hitting_hbp=?, hitting_roe=?, hitting_fc=?, hitting_dp=?, running_r=?, running_sb=?, running_cs=?, running_lob=?, pitching_inn=?, pitching_inn_p=?, pitching_count=?, pitching_bf=?, pitching_ab=?, pitching_r=?, pitching_er=?, pitching_bb=?, pitching_k=?, pitching_h=?, pitching_hr=?, pitching_wp=?, pitching_hb=?, pitching_w=?, pitching_l=?, pitching_s=?, pitching_cg=?, pitching_sho=?, fielding_asst=?, fielding_po=?, fielding_e=?, catching_ic=?, catching_pb=?, catching_sb=?, catching_cs=?, catching_co=?, entered=?, battingorder=?  where  id ='"+jos_fastball_playerstat.getId()+"'  ";
      pupdate= con.prepareStatement(sql);
      pupdate.setInt(1,jos_fastball_playerstat.getId());
pupdate.setInt(2,jos_fastball_playerstat.getGameid());
pupdate.setInt(3,jos_fastball_playerstat.getPlayerid());
pupdate.setBoolean(4,jos_fastball_playerstat.getHomeflag());
pupdate.setInt(5,jos_fastball_playerstat.getHitting_pa());
pupdate.setInt(6,jos_fastball_playerstat.getHitting_h());
pupdate.setInt(7,jos_fastball_playerstat.getHitting_rbi());
pupdate.setInt(8,jos_fastball_playerstat.getHitting_1b());
pupdate.setInt(9,jos_fastball_playerstat.getHitting_2b());
pupdate.setInt(10,jos_fastball_playerstat.getHitting_3b());
pupdate.setInt(11,jos_fastball_playerstat.getHitting_hr());
pupdate.setInt(12,jos_fastball_playerstat.getHitting_bb());
pupdate.setInt(13,jos_fastball_playerstat.getHitting_k());
pupdate.setInt(14,jos_fastball_playerstat.getHitting_sac());
pupdate.setInt(15,jos_fastball_playerstat.getHitting_hbp());
pupdate.setInt(16,jos_fastball_playerstat.getHitting_roe());
pupdate.setInt(17,jos_fastball_playerstat.getHitting_fc());
pupdate.setInt(18,jos_fastball_playerstat.getHitting_dp());
pupdate.setInt(19,jos_fastball_playerstat.getRunning_r());
pupdate.setInt(20,jos_fastball_playerstat.getRunning_sb());
pupdate.setInt(21,jos_fastball_playerstat.getRunning_cs());
pupdate.setInt(22,jos_fastball_playerstat.getRunning_lob());
pupdate.setInt(23,jos_fastball_playerstat.getPitching_inn());
pupdate.setInt(24,jos_fastball_playerstat.getPitching_inn_p());
pupdate.setInt(25,jos_fastball_playerstat.getPitching_count());
pupdate.setInt(26,jos_fastball_playerstat.getPitching_bf());
pupdate.setInt(27,jos_fastball_playerstat.getPitching_ab());
pupdate.setInt(28,jos_fastball_playerstat.getPitching_r());
pupdate.setInt(29,jos_fastball_playerstat.getPitching_er());
pupdate.setInt(30,jos_fastball_playerstat.getPitching_bb());
pupdate.setInt(31,jos_fastball_playerstat.getPitching_k());
pupdate.setInt(32,jos_fastball_playerstat.getPitching_h());
pupdate.setInt(33,jos_fastball_playerstat.getPitching_hr());
pupdate.setInt(34,jos_fastball_playerstat.getPitching_wp());
pupdate.setInt(35,jos_fastball_playerstat.getPitching_hb());
pupdate.setInt(36,jos_fastball_playerstat.getPitching_w());
pupdate.setInt(37,jos_fastball_playerstat.getPitching_l());
pupdate.setInt(38,jos_fastball_playerstat.getPitching_s());
pupdate.setInt(39,jos_fastball_playerstat.getPitching_cg());
pupdate.setInt(40,jos_fastball_playerstat.getPitching_sho());
pupdate.setInt(41,jos_fastball_playerstat.getFielding_asst());
pupdate.setInt(42,jos_fastball_playerstat.getFielding_po());
pupdate.setInt(43,jos_fastball_playerstat.getFielding_e());
pupdate.setInt(44,jos_fastball_playerstat.getCatching_ic());
pupdate.setInt(45,jos_fastball_playerstat.getCatching_pb());
pupdate.setInt(46,jos_fastball_playerstat.getCatching_sb());
pupdate.setInt(47,jos_fastball_playerstat.getCatching_cs());
pupdate.setInt(48,jos_fastball_playerstat.getCatching_co());
pupdate.setBoolean(49,jos_fastball_playerstat.getEntered());
pupdate.setInt(50,jos_fastball_playerstat.getBattingorder());
      int filas= pupdate.executeUpdate();
      pupdate.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo actualizar");
          esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* Editar()
*/

public static boolean Editar(String sqlupdate ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pupdate = null;
      String sql = "update  jos_fastball_playerstat set " + sqlupdate +"";
      pupdate= con.prepareStatement(sql);
      int filas= pupdate.executeUpdate();
      pupdate.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo editar");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* EditarClavePrimaria()
*/

public static boolean EditarClavePrimaria(Jos_fastball_playerstat jos_fastball_playerstat_old , Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pupdate = null;
      String sql = "update jos_fastball_playerstat set  id=?  where  id ='"+jos_fastball_playerstat_old.getId()+"'  ";
      pupdate= con.prepareStatement(sql);
      pupdate.setInt(1,jos_fastball_playerstat.getId());
      int filas= pupdate.executeUpdate();
      pupdate.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo actualizar");
          esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* Eliminar()
*/

public static boolean Eliminar(Jos_fastball_playerstat jos_fastball_playerstat ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pdelete = null;
      String sql = "delete from jos_fastball_playerstat  where  id = ?  ";
      pdelete= con.prepareStatement(sql);
      pdelete.setInt(1,jos_fastball_playerstat.getId());
      int filas= pdelete.executeUpdate();
      pdelete.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo eliminar");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* EliminarSQL()
*/

public static boolean Eliminar(String sqldelete ) {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pdelete = null;
      String sql = "delete from jos_fastball_playerstat where " + sqldelete +"";
      pdelete= con.prepareStatement(sql);
      int filas= pdelete.executeUpdate();
      pdelete.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo eliminar");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* ElimninarTodos()
*/

public static boolean EliminarTodos() {
  excepcion = null;
  try {
      esMensaje =false;
     if (!Conectar()) {
         return false;
      }
      PreparedStatement pdelete = null;
      String sql = "delete from jos_fastball_playerstat  ";
      pdelete= con.prepareStatement(sql);
      int filas= pdelete.executeUpdate();
      pdelete.close();
      con.close();
      if (filas <= 0){
          excepcion = new Exception("No se pudo eliminar todos los registros");
           esMensaje =true;
          return false;
      }
      return true;
   } catch (Exception e) {
      excepcion = e;
   } finally {
  }
  return false;
}


/**
*
* ExisteRegistro()
*/



public static boolean ExisteRegistro(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return false;
      }
      String sql = "select * from jos_fastball_playerstat where id='"+jos_fastball_playerstat.getId()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return false;
   }
    rs.close();
    psquery.close();
    con.close();
 return true;
} catch (Exception ex) {
      excepcion = ex;
}
  return false;
}


/**
*
* findByPrimaryKey()
*/



public static Jos_fastball_playerstat findByPrimaryKey(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      String sql = "select * from jos_fastball_playerstat where id='"+jos_fastball_playerstat.getId()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
            
            
            jos_fastball_playerstat.setId(rs.getInt("id"));
jos_fastball_playerstat.setGameid(rs.getInt("gameid"));
jos_fastball_playerstat.setPlayerid(rs.getInt("playerid"));
jos_fastball_playerstat.setHomeflag(rs.getBoolean("homeflag"));
jos_fastball_playerstat.setHitting_pa(rs.getInt("hitting_pa"));
jos_fastball_playerstat.setHitting_h(rs.getInt("hitting_h"));
jos_fastball_playerstat.setHitting_rbi(rs.getInt("hitting_rbi"));
jos_fastball_playerstat.setHitting_1b(rs.getInt("hitting_1b"));
jos_fastball_playerstat.setHitting_2b(rs.getInt("hitting_2b"));
jos_fastball_playerstat.setHitting_3b(rs.getInt("hitting_3b"));
jos_fastball_playerstat.setHitting_hr(rs.getInt("hitting_hr"));
jos_fastball_playerstat.setHitting_bb(rs.getInt("hitting_bb"));
jos_fastball_playerstat.setHitting_k(rs.getInt("hitting_k"));
jos_fastball_playerstat.setHitting_sac(rs.getInt("hitting_sac"));
jos_fastball_playerstat.setHitting_hbp(rs.getInt("hitting_hbp"));
jos_fastball_playerstat.setHitting_roe(rs.getInt("hitting_roe"));
jos_fastball_playerstat.setHitting_fc(rs.getInt("hitting_fc"));
jos_fastball_playerstat.setHitting_dp(rs.getInt("hitting_dp"));
jos_fastball_playerstat.setRunning_r(rs.getInt("running_r"));
jos_fastball_playerstat.setRunning_sb(rs.getInt("running_sb"));
jos_fastball_playerstat.setRunning_cs(rs.getInt("running_cs"));
jos_fastball_playerstat.setRunning_lob(rs.getInt("running_lob"));
jos_fastball_playerstat.setPitching_inn(rs.getInt("pitching_inn"));
jos_fastball_playerstat.setPitching_inn_p(rs.getInt("pitching_inn_p"));
jos_fastball_playerstat.setPitching_count(rs.getInt("pitching_count"));
jos_fastball_playerstat.setPitching_bf(rs.getInt("pitching_bf"));
jos_fastball_playerstat.setPitching_ab(rs.getInt("pitching_ab"));
jos_fastball_playerstat.setPitching_r(rs.getInt("pitching_r"));
jos_fastball_playerstat.setPitching_er(rs.getInt("pitching_er"));
jos_fastball_playerstat.setPitching_bb(rs.getInt("pitching_bb"));
jos_fastball_playerstat.setPitching_k(rs.getInt("pitching_k"));
jos_fastball_playerstat.setPitching_h(rs.getInt("pitching_h"));
jos_fastball_playerstat.setPitching_hr(rs.getInt("pitching_hr"));
jos_fastball_playerstat.setPitching_wp(rs.getInt("pitching_wp"));
jos_fastball_playerstat.setPitching_hb(rs.getInt("pitching_hb"));
jos_fastball_playerstat.setPitching_w(rs.getInt("pitching_w"));
jos_fastball_playerstat.setPitching_l(rs.getInt("pitching_l"));
jos_fastball_playerstat.setPitching_s(rs.getInt("pitching_s"));
jos_fastball_playerstat.setPitching_cg(rs.getInt("pitching_cg"));
jos_fastball_playerstat.setPitching_sho(rs.getInt("pitching_sho"));
jos_fastball_playerstat.setFielding_asst(rs.getInt("fielding_asst"));
jos_fastball_playerstat.setFielding_po(rs.getInt("fielding_po"));
jos_fastball_playerstat.setFielding_e(rs.getInt("fielding_e"));
jos_fastball_playerstat.setCatching_ic(rs.getInt("catching_ic"));
jos_fastball_playerstat.setCatching_pb(rs.getInt("catching_pb"));
jos_fastball_playerstat.setCatching_sb(rs.getInt("catching_sb"));
jos_fastball_playerstat.setCatching_cs(rs.getInt("catching_cs"));
jos_fastball_playerstat.setCatching_co(rs.getInt("catching_co"));
jos_fastball_playerstat.setEntered(rs.getBoolean("entered"));
jos_fastball_playerstat.setBattingorder(rs.getInt("battingorder"));
    }
    rs.close();
    psquery.close();
    con.close();
 return jos_fastball_playerstat;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findById()
*/

public static List<Jos_fastball_playerstat> findById(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where id='"+jos_fastball_playerstat.getId()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByGameid()
*/

public static List<Jos_fastball_playerstat> findByGameid(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where gameid='"+jos_fastball_playerstat.getGameid()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPlayerid()
*/

public static List<Jos_fastball_playerstat> findByPlayerid(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where playerid='"+jos_fastball_playerstat.getPlayerid()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHomeflag()
*/

public static List<Jos_fastball_playerstat> findByHomeflag(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where homeflag='"+jos_fastball_playerstat.getHomeflag()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_pa()
*/

public static List<Jos_fastball_playerstat> findByHitting_pa(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_pa='"+jos_fastball_playerstat.getHitting_pa()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_h()
*/

public static List<Jos_fastball_playerstat> findByHitting_h(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_h='"+jos_fastball_playerstat.getHitting_h()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_rbi()
*/

public static List<Jos_fastball_playerstat> findByHitting_rbi(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_rbi='"+jos_fastball_playerstat.getHitting_rbi()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_1b()
*/

public static List<Jos_fastball_playerstat> findByHitting_1b(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_1b='"+jos_fastball_playerstat.getHitting_1b()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_2b()
*/

public static List<Jos_fastball_playerstat> findByHitting_2b(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_2b='"+jos_fastball_playerstat.getHitting_2b()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_3b()
*/

public static List<Jos_fastball_playerstat> findByHitting_3b(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_3b='"+jos_fastball_playerstat.getHitting_3b()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_hr()
*/

public static List<Jos_fastball_playerstat> findByHitting_hr(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_hr='"+jos_fastball_playerstat.getHitting_hr()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_bb()
*/

public static List<Jos_fastball_playerstat> findByHitting_bb(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_bb='"+jos_fastball_playerstat.getHitting_bb()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_k()
*/

public static List<Jos_fastball_playerstat> findByHitting_k(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_k='"+jos_fastball_playerstat.getHitting_k()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_sac()
*/

public static List<Jos_fastball_playerstat> findByHitting_sac(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_sac='"+jos_fastball_playerstat.getHitting_sac()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_hbp()
*/

public static List<Jos_fastball_playerstat> findByHitting_hbp(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_hbp='"+jos_fastball_playerstat.getHitting_hbp()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_roe()
*/

public static List<Jos_fastball_playerstat> findByHitting_roe(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_roe='"+jos_fastball_playerstat.getHitting_roe()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_fc()
*/

public static List<Jos_fastball_playerstat> findByHitting_fc(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_fc='"+jos_fastball_playerstat.getHitting_fc()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByHitting_dp()
*/

public static List<Jos_fastball_playerstat> findByHitting_dp(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where hitting_dp='"+jos_fastball_playerstat.getHitting_dp()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByRunning_r()
*/

public static List<Jos_fastball_playerstat> findByRunning_r(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where running_r='"+jos_fastball_playerstat.getRunning_r()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByRunning_sb()
*/

public static List<Jos_fastball_playerstat> findByRunning_sb(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where running_sb='"+jos_fastball_playerstat.getRunning_sb()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByRunning_cs()
*/

public static List<Jos_fastball_playerstat> findByRunning_cs(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where running_cs='"+jos_fastball_playerstat.getRunning_cs()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByRunning_lob()
*/

public static List<Jos_fastball_playerstat> findByRunning_lob(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where running_lob='"+jos_fastball_playerstat.getRunning_lob()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_inn()
*/

public static List<Jos_fastball_playerstat> findByPitching_inn(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_inn='"+jos_fastball_playerstat.getPitching_inn()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_inn_p()
*/

public static List<Jos_fastball_playerstat> findByPitching_inn_p(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_inn_p='"+jos_fastball_playerstat.getPitching_inn_p()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_count()
*/

public static List<Jos_fastball_playerstat> findByPitching_count(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_count='"+jos_fastball_playerstat.getPitching_count()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_bf()
*/

public static List<Jos_fastball_playerstat> findByPitching_bf(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_bf='"+jos_fastball_playerstat.getPitching_bf()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_ab()
*/

public static List<Jos_fastball_playerstat> findByPitching_ab(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_ab='"+jos_fastball_playerstat.getPitching_ab()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_r()
*/

public static List<Jos_fastball_playerstat> findByPitching_r(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_r='"+jos_fastball_playerstat.getPitching_r()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_er()
*/

public static List<Jos_fastball_playerstat> findByPitching_er(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_er='"+jos_fastball_playerstat.getPitching_er()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_bb()
*/

public static List<Jos_fastball_playerstat> findByPitching_bb(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_bb='"+jos_fastball_playerstat.getPitching_bb()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_k()
*/

public static List<Jos_fastball_playerstat> findByPitching_k(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_k='"+jos_fastball_playerstat.getPitching_k()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_h()
*/

public static List<Jos_fastball_playerstat> findByPitching_h(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_h='"+jos_fastball_playerstat.getPitching_h()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_hr()
*/

public static List<Jos_fastball_playerstat> findByPitching_hr(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_hr='"+jos_fastball_playerstat.getPitching_hr()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_wp()
*/

public static List<Jos_fastball_playerstat> findByPitching_wp(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_wp='"+jos_fastball_playerstat.getPitching_wp()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_hb()
*/

public static List<Jos_fastball_playerstat> findByPitching_hb(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_hb='"+jos_fastball_playerstat.getPitching_hb()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_w()
*/

public static List<Jos_fastball_playerstat> findByPitching_w(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_w='"+jos_fastball_playerstat.getPitching_w()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_l()
*/

public static List<Jos_fastball_playerstat> findByPitching_l(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_l='"+jos_fastball_playerstat.getPitching_l()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_s()
*/

public static List<Jos_fastball_playerstat> findByPitching_s(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_s='"+jos_fastball_playerstat.getPitching_s()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_cg()
*/

public static List<Jos_fastball_playerstat> findByPitching_cg(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_cg='"+jos_fastball_playerstat.getPitching_cg()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByPitching_sho()
*/

public static List<Jos_fastball_playerstat> findByPitching_sho(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where pitching_sho='"+jos_fastball_playerstat.getPitching_sho()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByFielding_asst()
*/

public static List<Jos_fastball_playerstat> findByFielding_asst(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where fielding_asst='"+jos_fastball_playerstat.getFielding_asst()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByFielding_po()
*/

public static List<Jos_fastball_playerstat> findByFielding_po(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where fielding_po='"+jos_fastball_playerstat.getFielding_po()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByFielding_e()
*/

public static List<Jos_fastball_playerstat> findByFielding_e(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where fielding_e='"+jos_fastball_playerstat.getFielding_e()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByCatching_ic()
*/

public static List<Jos_fastball_playerstat> findByCatching_ic(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where catching_ic='"+jos_fastball_playerstat.getCatching_ic()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByCatching_pb()
*/

public static List<Jos_fastball_playerstat> findByCatching_pb(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where catching_pb='"+jos_fastball_playerstat.getCatching_pb()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByCatching_sb()
*/

public static List<Jos_fastball_playerstat> findByCatching_sb(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where catching_sb='"+jos_fastball_playerstat.getCatching_sb()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByCatching_cs()
*/

public static List<Jos_fastball_playerstat> findByCatching_cs(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where catching_cs='"+jos_fastball_playerstat.getCatching_cs()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByCatching_co()
*/

public static List<Jos_fastball_playerstat> findByCatching_co(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where catching_co='"+jos_fastball_playerstat.getCatching_co()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByEntered()
*/

public static List<Jos_fastball_playerstat> findByEntered(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where entered='"+jos_fastball_playerstat.getEntered()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByBattingorder()
*/

public static List<Jos_fastball_playerstat> findByBattingorder(Jos_fastball_playerstat jos_fastball_playerstat) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
      List<Jos_fastball_playerstat> list = new ArrayList<>();
      String sql = "select * from jos_fastball_playerstat where battingorder='"+jos_fastball_playerstat.getBattingorder()+"'";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstatcon esa condicion");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* findByMapa()
*/

public static List<Jos_fastball_playerstat> findByMapa(Map parametros) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
  List<Jos_fastball_playerstat> list = new ArrayList<>();
  String sql = "select * from jos_fastball_playerstat";
  if (parametros != null) {
      Iterator it = parametros.entrySet().iterator();
      StringBuilder sb = new StringBuilder("");
      int i = 0;
      while (it.hasNext()) {
          if (i != 0){
            sb.append(" and ");
         }
         i++;
        Map.Entry e = (Map.Entry) it.next();
        sb.append(e.getKey() +"= '"+  e.getValue()+"'");
      }
      if (!sb.toString().equals("")){
         sql = sql + " where " + sb.toString();
      }
   }
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstat con esa condición");
      esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* Double Func(String funcion, String campo)
*/



public static Double Func(String funcion, String campo) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0.0;
      }
      String sql = "select "+funcion+"("+campo+") as contador from jos_fastball_playerstat";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstat ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0.0;
   }
    Double tmp =0.0;
   rs.beforeFirst();
   while (rs.next()) {
    tmp =  rs.getDouble("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return tmp;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0.0;
}


/**
*
* Double Func(String funcion, String campo,String where)
*/



public static Double Func(String funcion, String campo, String where) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0.0;
      }
      String sql = "select "+funcion+"("+campo+") as contador from jos_fastball_playerstat where "+where +" ";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstat ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0.0;
   }
    Double tmp =0.0;
   rs.beforeFirst();
   while (rs.next()) {
    tmp =  rs.getDouble("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return tmp;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0.0;
}


/**
*
* Contador()
*/



public static Integer Contador() {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0;
      }
      String sql = "select count(*) as contador from jos_fastball_playerstat";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstat ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0;
   }
   rs.beforeFirst();
   while (rs.next()) {
    x =  rs.getInt("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return x;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0;
}


/**
*
* Contador(String sqlquery)
*/



public static Integer Contador(String sqlquery) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return 0;
      }
      String sql = "select count(*) as contador from jos_fastball_playerstat where  " + sqlquery +"";
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstat ");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return 0;
   }
   rs.beforeFirst();
   while (rs.next()) {
    x =  rs.getInt("contador");
    }
    rs.close();
    psquery.close();
    con.close();
 return x;
} catch (Exception ex) {
      excepcion = ex;
}
  return 0;
}


/**
*
* Query()
*/

public static List<Jos_fastball_playerstat> Query(String query) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
  List<Jos_fastball_playerstat> list = new ArrayList<>();
  String sql = "select * from jos_fastball_playerstat where " + query +"";
  if (query == null || query.equals("")) {
  return null;
   }
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstat con esa condición");
      esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
   
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
}


/**
*
* Listar()
*/

public static List<Jos_fastball_playerstat> getLista(Map parametros) {
  excepcion = null;
  try {
      esMensaje =false;
      if (!Conectar()) {
         return null;
      }
  List<Jos_fastball_playerstat> list = new ArrayList<>();
  String sql = "select * from jos_fastball_playerstat";
  if (parametros != null) {
      Iterator it = parametros.entrySet().iterator();
      StringBuilder sb = new StringBuilder("");
      while (it.hasNext()) {
        Map.Entry e = (Map.Entry) it.next();
        sb.append(e.getKey() +"="+  e.getValue());
      }
      if (!sb.toString().equals("")){
         sql = sql + " where " + sb.toString();
      }
   }
  PreparedStatement psquery = con.prepareStatement(sql,ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
   ResultSet rs = psquery.executeQuery();
   rs.next();
   int x = rs.getRow();
   if (x == 0) {
      excepcion = new Exception("No existen registros en la tabla jos_fastball_playerstat");
       esMensaje =true;
      rs.close();
      psquery.close();
      con.close();
      return null;
   }
   rs.beforeFirst();
   while (rs.next()) {
       
        Jos_fastball_playerstat jos_fastball_playerstat2 = new Jos_fastball_playerstat(
         rs.getInt("id"),rs.getInt("gameid"),rs.getInt("playerid"),rs.getBoolean("homeflag"),rs.getInt("hitting_pa"),rs.getInt("hitting_h"),rs.getInt("hitting_rbi"),rs.getInt("hitting_1b"),rs.getInt("hitting_2b"),rs.getInt("hitting_3b"),rs.getInt("hitting_hr"),rs.getInt("hitting_bb"),rs.getInt("hitting_k"),rs.getInt("hitting_sac"),rs.getInt("hitting_hbp"),rs.getInt("hitting_roe"),rs.getInt("hitting_fc"),rs.getInt("hitting_dp"),rs.getInt("running_r"),rs.getInt("running_sb"),rs.getInt("running_cs"),rs.getInt("running_lob"),rs.getInt("pitching_inn"),rs.getInt("pitching_inn_p"),rs.getInt("pitching_count"),rs.getInt("pitching_bf"),rs.getInt("pitching_ab"),rs.getInt("pitching_r"),rs.getInt("pitching_er"),rs.getInt("pitching_bb"),rs.getInt("pitching_k"),rs.getInt("pitching_h"),rs.getInt("pitching_hr"),rs.getInt("pitching_wp"),rs.getInt("pitching_hb"),rs.getInt("pitching_w"),rs.getInt("pitching_l"),rs.getInt("pitching_s"),rs.getInt("pitching_cg"),rs.getInt("pitching_sho"),rs.getInt("fielding_asst"),rs.getInt("fielding_po"),rs.getInt("fielding_e"),rs.getInt("catching_ic"),rs.getInt("catching_pb"),rs.getInt("catching_sb"),rs.getInt("catching_cs"),rs.getInt("catching_co"),rs.getBoolean("entered"),rs.getInt("battingorder"));
            
            
       list.add(jos_fastball_playerstat2);
    }
    rs.close();
    psquery.close();
    con.close();
    return list;
} catch (Exception ex) {
      excepcion = ex;
}
  return null;
 }


/**
*
* Conectar()
*/



public static boolean Conectar() {
try {
 Sesion sesion = new Sesion();
  con = sesion.Conectar();
  if (con == null){
      return false;
   }
  return true;
  } catch (Exception ex) {
Mensajeria.MensajeError(ex, "Conectar()");
 }
    return false;
 }


}
